home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / warpup1.lha / WarpUP-WarpOS / include / clib / powerpc_protos.h
C/C++ Source or Header  |  1998-04-07  |  5KB  |  210 lines

  1. #ifndef CLIB_POWERPC_PROTOS_H
  2. #define CLIB_POWERPC_PROTOS_H
  3.  
  4. /*
  5. **  $VER: powerpc_protos.h 2.0 (24.12.97)
  6. **  WarpOS Release 14.1
  7. **
  8. **  '(C) Copyright 1997 Haage & Partner Computer GmbH'
  9. **       All Rights Reserved
  10. */
  11.  
  12. #ifndef UTILITY_TAGITEM_H
  13. #include <utility/tagitem.h>
  14. #endif
  15.  
  16. #ifndef DEVICES_TIMER_H
  17. #include <devices/timer.h>
  18. #endif
  19.  
  20. #ifndef POWERPC_PORTSPPC_H
  21. #include <powerpc/portsPPC.h>
  22. #endif
  23.  
  24. #ifndef POWERPC_TASKS_H
  25. #include <powerpc/tasksppc.h>
  26. #endif
  27.  
  28. #ifndef POWERPC_SEMAPHORES_H
  29. #include <powerpc/semaphoresppc.h>
  30. #endif
  31.  
  32. #ifndef __PPC__
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. /* *** ppc call */
  39. ULONG RunPPC(struct PPCArgs *);
  40. ULONG WaitForPPC(struct PPCArgs *);
  41.  
  42. /* *** hardware */
  43. ULONG GetCPU(VOID);
  44.  
  45. /* *** debugging */
  46. VOID PowerDebugMode(ULONG);
  47. VOID SPrintF68K(STRPTR,APTR);
  48.  
  49. /* *** memory */
  50. APTR AllocVec32(ULONG,ULONG);
  51. VOID FreeVec32(APTR);
  52.  
  53. /* *** general information */
  54. ULONG GetPPCState(VOID);
  55.  
  56. #ifndef POWERPCLIB_V7
  57.  
  58. /* *** ports */
  59. struct Message *AllocXMsg(ULONG,struct MsgPort);
  60. VOID FreeXMsg(struct Message);
  61. VOID PutXMsg(struct MsgPortPPC, struct Message);
  62.  
  63. #endif /* POWERPCLIB_V7 */
  64.  
  65. #ifdef __cplusplus
  66. };
  67. #endif
  68.  
  69. #ifdef STORMPRAGMAS
  70. #ifndef _INCLUDE_PRAGMA_POWERPC_LIB_H
  71. #include <pragma/powerpc_lib.h>
  72. #endif
  73. #endif
  74.  
  75. #else /* __PPC__ */
  76.  
  77. #ifdef __STORM__                /* other syntax for StormC */
  78.  
  79. #ifndef STORMPROTOS_POWERPC_SPROTOS_H
  80. #include <stormprotos/powerpc_sprotos.h>
  81. #endif
  82.  
  83. #else /* __STORM__ */
  84.  
  85.  
  86. #ifdef __cplusplus
  87. extern "C" {
  88. #endif
  89.  
  90. ULONG Run68K(struct PPCArgs *);
  91. ULONG WaitFor68K(struct PPCArgs *);
  92.  
  93. /* *** debugging */
  94. VOID SPrintF(STRPTR, APTR);
  95.  
  96. /* *** memory */
  97. APTR AllocVecPPC(ULONG, ULONG, ULONG);
  98. LONG FreeVecPPC(APTR);
  99.  
  100. /* *** time measurement */
  101. VOID GetSysTimePPC(struct timeval *);
  102. VOID AddTimePPC(struct timeval *, struct timeval *);
  103. VOID SubTimePPC(struct timeval *, struct timeval *);
  104. LONG CmpTimePPC(struct timeval *, struct timeval *);
  105.  
  106. #ifndef POWERPCLIB_V7
  107. /* *** more debugging */
  108. ULONG SnoopTask(struct TagItem *);
  109. ULONG SnoopTaskTags(Tag tag1, ...);
  110. VOID EndSnoopTask(ULONG);
  111.  
  112. /* *** more memory */
  113. VOID FreeAllMem();
  114. VOID CopyMemPPC(APTR, APTR, ULONG);
  115.  
  116. /* *** lists */
  117. VOID AddHeadPPC(struct List *, struct Node *);
  118. VOID AddTailPPC(struct List *, struct Node *);
  119. VOID EnqueuePPC(struct List *, struct Node *);
  120. struct Node *FindNamePPC(struct List *, STRPTR);
  121. VOID InsertPPC(struct Node *, struct Node *);
  122. struct Node *RemHeadPPC(struct List *);
  123. VOID RemovePPC(struct Node *);
  124. struct Node *RemTailPPC(struct Node *);
  125.  
  126. /* *** semaphores */
  127. VOID AddSemaphorePPC(struct SignalSemaphorePPC *);
  128. LONG AttemptSemaphorePPC(struct SignalSemaphorePPC *);
  129. struct SignalSemaphorePPC *FindSemaphorePPC(STRPTR);
  130. VOID FreeSemaphorePPC(struct SignalSemaphorePPC *);
  131. LONG InitSemaphorePPC(struct SignalSemaphorePPC *);
  132. VOID ObtainSemaphorePPC(struct SignalSemaphorePPC *);
  133. VOID ReleaseSemaphorePPC(struct SignalSemaphorePPC *);
  134. VOID RemSemaphorePPC(struct SignalSemaphorePPC *);
  135.  
  136. /* *** signals */
  137. LONG AllocSignalPPC(LONG);
  138. VOID FreeSignalPPC(LONG);
  139. ULONG SetSignalPPC(ULONG, ULONG);
  140. VOID SignalPPC(struct TaskPPC *, ULONG);
  141. ULONG WaitPPC(ULONG);
  142. ULONG WaitTime(ULONG, ULONG);
  143.  
  144. /* *** tasks */
  145. struct TaskPPC *CreateTaskPPC(struct TagItem *);
  146. struct TaskPPC *CreateTaskPPCTags(Tag tag1, ...);
  147. VOID DeleteTaskPPC(struct TaskPPC *);
  148. struct TaskPPC *FindTaskPPC(STRPTR);
  149. struct TaskPtr *LockTaskList();
  150. LONG SetTaskPriPPC(struct TaskPPC *, LONG);
  151. VOID UnLockTaskList();
  152. struct TaskPPC *FindTaskByID(LONG);
  153. LONG SetNiceValue(struct TaskPPC *, LONG);
  154.  
  155. /* *** ports */
  156. VOID AddPortPPC(struct MsgPortPPC *);
  157. struct MsgPortPPC *CreateMsgPortPPC();
  158. VOID DeleteMsgPortPPC(struct MsgPortPPC *);
  159. struct MsgPortPPC *FindPortPPC(STRPTR);
  160. struct Message *GetMsgPPC(struct MsgPortPPC *);
  161. VOID PutMsgPPC(struct MsgPortPPC *, struct Message *);
  162. struct Message *WaitPortPPC(struct MsgPortPPC *);
  163. VOID RemPortPPC(struct MsgPortPPC *);
  164. VOID ReplyMsgPPC(struct Message *);
  165. struct Message *AllocXMsgPPC(ULONG, struct MsgPortPPC *);
  166. VOID FreeXMsgPPC(struct Message *);
  167. VOID PutXMsgPPC(struct MsgPort *, struct Message *);
  168. struct MsgPortPPC *SetReplyPortPPC(struct Message *, struct MsgPortPPC *);
  169.  
  170. /* *** tag items */
  171. struct TagItem *FindTagItemPPC(ULONG, struct TagItem *);
  172. ULONG GetTagDataPPC(ULONG, ULONG, struct TagItem *);
  173. struct TagItem *NextTagItemPPC(struct TagItem **);
  174.  
  175. /* *** hardware */
  176. VOID ChangeMMU(ULONG);
  177. VOID GetInfo(struct TagItem *);
  178. VOID SetCache(ULONG, APTR, ULONG);
  179. ULONG SetHardware(ULONG, APTR);
  180. VOID GetHALInfo(struct TagItem *);
  181. VOID SetScheduling(struct TagItem *);
  182.  
  183. /* *** exceptions */
  184. VOID ModifyFPExc(ULONG);
  185. VOID RemExcHandler(APTR);
  186. APTR SetExcHandler(struct TagItem *);
  187. APTR SetExcHandlerTags(Tag tag1, ...);
  188. VOID SetExcMMU();
  189. VOID ClearExcMMU();
  190.  
  191. /* *** supervisor */
  192. ULONG Super();
  193. VOID User(ULONG);
  194.  
  195. /* *** 68K connection */
  196. VOID Signal68K(struct Task *, ULONG);
  197.  
  198. #endif /* POWERPCLIB_V7 */
  199.  
  200. #ifdef __cplusplus
  201. };
  202. #endif
  203.  
  204. #endif /* __STORM__ */
  205.  
  206. #endif /* __PPC__ */
  207.  
  208.  
  209. #endif /* CLIB_POWERPC_PROTOS_H */
  210.